Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Clear cast cache when setting attributes using arrow #42852

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

shaffe-fr
Copy link
Contributor

Hi,

It's sometime convenient to use the arrow notation to set the value of a class casted attribute.

Here is an example in a Nova resource:

Boolean::make('New order notification', 'settings->newOrderNotification')

This PR fixes a bug that prevented the model to detect the change because of the cache.

The commit can be cherry-picked in the 8.x branch.

Thanks

@shaffe-fr shaffe-fr force-pushed the fix/json-castable-arrow branch from 3208848 to 92d9294 Compare June 17, 2022 09:09
@taylorotwell taylorotwell merged commit ae60983 into laravel:9.x Jun 20, 2022
@GrahamCampbell GrahamCampbell changed the title Clear cast cache when setting attributes using arrow [9.x] Clear cast cache when setting attributes using arrow Jun 20, 2022
@shaffe-fr shaffe-fr deleted the fix/json-castable-arrow branch June 24, 2022 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants